package com.jt.test;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

class MyRunnable implements Runnable{
    static int i=100;
    Object o=new Object();
    @Override
    public void run() {

        while (true){
            synchronized (o){
            if(i>0){

                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

            System.out.println(Thread.currentThread().getName()+"="+i--);
            }
            if(i<=0)break;
            }
        }

    }
}